#include "MyApplication.h"

MyApplication::MyApplication(int &argc, char **argv) : QApplication(argc, argv)
{

}

bool MyApplication::notify(QObject *receiver, QEvent *event)
{
    if (event->type() == QEvent::KeyPress) {
        QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
        if (keyEvent->key() == Qt::Key_Plus && keyEvent->modifiers() == Qt::ControlModifier) {
            qDebug() << "Ctrl + 加号 按键被捕获！";
            // 这里可以添加你想要执行的代码
        }
    }
    return QApplication::notify(receiver, event);
}
